﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using Lswweb.Domain;
using Lswweb.Domain.ResourceConfiguration;

namespace Lswweb.Controls
{
    [FileLevelControlBuilder(typeof(SkinnedUserControlBuilder))]
    public class SkinnedUserControl : UserControl
    {
        private SkinnedWebControl parent;
        public new SkinnedWebControl Parent 
        {
            get { return this.parent; }
            internal set { parent = value; } 
        }

        protected ResourceStrings Strings
        {
            get { return ResourceManagement.Content.Strings; }
        }

        protected SiteSettings Settings
        {
            get { return SiteSettings.Settings; }
        }

        public new Lswweb.Domain.Page Page
        {
            get { return base.Page as Lswweb.Domain.Page; }
        }
    }

    [FileLevelControlBuilder(typeof(SkinnedUserControlBuilder))]
    public class SkinnedUserControl<TParentControl> : SkinnedUserControl
        where TParentControl : SkinnedWebControl
    {
        public new TParentControl Parent
        {
            get { return (TParentControl)base.Parent; }
        }
    }
}
